package com.njthird.busi.service.impl;

import java.util.List;
import com.njthird.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.njthird.busi.mapper.BusiCuscapitalflowMapper;
import com.njthird.busi.domain.BusiCuscapitalflow;
import com.njthird.busi.service.IBusiCuscapitalflowService;

/**
 * 客户资金流水Service业务层处理
 * 
 * @author njthird
 * @date 2020-08-10
 */
@Service
public class BusiCuscapitalflowServiceImpl implements IBusiCuscapitalflowService 
{
    @Autowired
    private BusiCuscapitalflowMapper busiCuscapitalflowMapper;

    /**
     * 查询客户资金流水
     * 
     * @param id 客户资金流水ID
     * @return 客户资金流水
     */
    @Override
    public BusiCuscapitalflow selectBusiCuscapitalflowById(String id)
    {
        return busiCuscapitalflowMapper.selectBusiCuscapitalflowById(id);
    }

    /**
     * 查询客户资金流水列表
     * 
     * @param busiCuscapitalflow 客户资金流水
     * @return 客户资金流水
     */
    @Override
    public List<BusiCuscapitalflow> selectBusiCuscapitalflowList(BusiCuscapitalflow busiCuscapitalflow)
    {
        return busiCuscapitalflowMapper.selectBusiCuscapitalflowList(busiCuscapitalflow);
    }

    /**
     * 新增客户资金流水
     * 
     * @param busiCuscapitalflow 客户资金流水
     * @return 结果
     */
    @Override
    public int insertBusiCuscapitalflow(BusiCuscapitalflow busiCuscapitalflow)
    {
        busiCuscapitalflow.setCreateTime(DateUtils.getNowDate());
        return busiCuscapitalflowMapper.insertBusiCuscapitalflow(busiCuscapitalflow);
    }

    /**
     * 修改客户资金流水
     * 
     * @param busiCuscapitalflow 客户资金流水
     * @return 结果
     */
    @Override
    public int updateBusiCuscapitalflow(BusiCuscapitalflow busiCuscapitalflow)
    {
        busiCuscapitalflow.setUpdateTime(DateUtils.getNowDate());
        return busiCuscapitalflowMapper.updateBusiCuscapitalflow(busiCuscapitalflow);
    }

    /**
     * 批量删除客户资金流水
     * 
     * @param ids 需要删除的客户资金流水ID
     * @return 结果
     */
    @Override
    public int deleteBusiCuscapitalflowByIds(String[] ids)
    {
        return busiCuscapitalflowMapper.deleteBusiCuscapitalflowByIds(ids);
    }

    /**
     * 删除客户资金流水信息
     * 
     * @param id 客户资金流水ID
     * @return 结果
     */
    @Override
    public int deleteBusiCuscapitalflowById(String id)
    {
        return busiCuscapitalflowMapper.deleteBusiCuscapitalflowById(id);
    }
}
